package com.yxw.system.controller;

import com.atguigu.model.system.SysLoginLog;
import com.atguigu.model.vo.SysLoginLogQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxw.common.result.Result;
import com.yxw.system.service.AsyncLoginLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: com.yxw.system.controller.SysLoginLogController
 * @description: TODO
 * @author: tommy
 * @create: 2023-08-05 下午 04:39
 */
@Api(value = "SysLoginLog管理", tags = "SysLoginLog管理")
@RestController
@RequestMapping(value="/admin/system/sysLoginLog")
public class SysLoginLogController {
    @Autowired
    private AsyncLoginLogService asyncLoginLogService;

    //条件分页查询登录日志
    @ApiOperation(value = "获取分页列表")
    @GetMapping("{page}/{limit}")
    public Result index(@PathVariable Long page,
                        @PathVariable Long limit,
                        SysLoginLogQueryVo sysLoginLogQueryVo) {
       IPage<SysLoginLog> pageModel =  asyncLoginLogService.selectPage(page,limit,sysLoginLogQueryVo);
       return Result.ok(pageModel);
    }


}
